{"ast":null,"code":"import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"children\", \"component\", \"disabled\", \"label\", \"slotProps\", \"slots\", \"value\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { unstable_useForkRef as useForkRef } from '@mui/utils';\nimport composeClasses from '../composeClasses';\nimport { SelectUnstyledContext } from '../SelectUnstyled/SelectUnstyledContext';\nimport { getOptionUnstyledUtilityClass } from './optionUnstyledClasses';\nimport { useSlotProps } from '../utils';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction useUtilityClasses(ownerState) {\n  const {\n    disabled,\n    highlighted,\n    selected\n  } = ownerState;\n  const slots = {\n    root: ['root', disabled && 'disabled', highlighted && 'highlighted', selected && 'selected']\n  };\n  return composeClasses(slots, getOptionUnstyledUtilityClass, {});\n}\n\n/**\n * An unstyled option to be used within a SelectUnstyled.\n */\nconst OptionUnstyled = /*#__PURE__*/React.forwardRef(function OptionUnstyled(props, ref) {\n  const {\n      children,\n      component,\n      disabled,\n      label,\n      slotProps = {},\n      slots = {},\n      value\n    } = props,\n    other = _objectWithoutPropertiesLoose(props, _excluded);\n  const selectContext = React.useContext(SelectUnstyledContext);\n  if (!selectContext) {\n    throw new Error('OptionUnstyled must be used within a SelectUnstyled');\n  }\n  const Root = component || slots.root || 'li';\n  const selectOption = {\n    value,\n    label: label || children,\n    disabled\n  };\n  const optionState = selectContext.getOptionState(selectOption);\n  const optionProps = selectContext.getOptionProps(selectOption);\n  const listboxRef = selectContext.listboxRef;\n  const ownerState = _extends({}, props, optionState);\n  const optionRef = React.useRef(null);\n  const handleRef = useForkRef(ref, optionRef);\n  React.useEffect(() => {\n    // Scroll to the currently highlighted option\n    if (optionState.highlighted) {\n      if (!listboxRef.current || !optionRef.current) {\n        return;\n      }\n      const listboxClientRect = listboxRef.current.getBoundingClientRect();\n      const optionClientRect = optionRef.current.getBoundingClientRect();\n      if (optionClientRect.top < listboxClientRect.top) {\n        listboxRef.current.scrollTop -= listboxClientRect.top - optionClientRect.top;\n      } else if (optionClientRect.bottom > listboxClientRect.bottom) {\n        listboxRef.current.scrollTop += optionClientRect.bottom - listboxClientRect.bottom;\n      }\n    }\n  }, [optionState.highlighted, listboxRef]);\n  const classes = useUtilityClasses(ownerState);\n  const rootProps = useSlotProps({\n    elementType: Root,\n    externalSlotProps: slotProps.root,\n    externalForwardedProps: other,\n    additionalProps: _extends({}, optionProps, {\n      ref: handleRef\n    }),\n    className: classes.root,\n    ownerState\n  });\n  return /*#__PURE__*/_jsx(Root, _extends({}, rootProps, {\n    children: children\n  }));\n});\nprocess.env.NODE_ENV !== \"production\" ? OptionUnstyled.propTypes /* remove-proptypes */ = {\n  // ----------------------------- Warning --------------------------------\n  // | These PropTypes are generated from the TypeScript type definitions |\n  // |     To update them edit TypeScript types and run \"yarn proptypes\"  |\n  // ----------------------------------------------------------------------\n  /**\n   * @ignore\n   */\n  children: PropTypes.node,\n  /**\n   * The component used for the root node.\n   * Either a string to use a HTML element or a component.\n   */\n  component: PropTypes.elementType,\n  /**\n   * If `true`, the option will be disabled.\n   * @default false\n   */\n  disabled: PropTypes.bool,\n  /**\n   * A text representation of the option's content.\n   * Used for keyboard text navigation matching.\n   */\n  label: PropTypes.string,\n  /**\n   * The props used for each slot inside the OptionUnstyled.\n   * @default {}\n   */\n  slotProps: PropTypes.shape({\n    root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n  }),\n  /**\n   * The components used for each slot inside the OptionUnstyled.\n   * Either a string to use a HTML element or a component.\n   * @default {}\n   */\n  slots: PropTypes.shape({\n    root: PropTypes.elementType\n  }),\n  /**\n   * The value of the option.\n   */\n  value: PropTypes.any.isRequired\n} : void 0;\n\n/**\n * An unstyled option to be used within a SelectUnstyled.\n *\n * Demos:\n *\n * - [Unstyled Select](https://mui.com/base/react-select/)\n *\n * API:\n *\n * - [OptionUnstyled API](https://mui.com/base/api/option-unstyled/)\n */\nexport default /*#__PURE__*/React.memo(OptionUnstyled);","map":{"version":3,"names":["_extends","_objectWithoutPropertiesLoose","_excluded","React","PropTypes","unstable_useForkRef","useForkRef","composeClasses","SelectUnstyledContext","getOptionUnstyledUtilityClass","useSlotProps","jsx","_jsx","useUtilityClasses","ownerState","disabled","highlighted","selected","slots","root","OptionUnstyled","forwardRef","props","ref","children","component","label","slotProps","value","other","selectContext","useContext","Error","Root","selectOption","optionState","getOptionState","optionProps","getOptionProps","listboxRef","optionRef","useRef","handleRef","useEffect","current","listboxClientRect","getBoundingClientRect","optionClientRect","top","scrollTop","bottom","classes","rootProps","elementType","externalSlotProps","externalForwardedProps","additionalProps","className","process","env","NODE_ENV","propTypes","node","bool","string","shape","oneOfType","func","object","any","isRequired","memo"],"sources":["/data/messenger.client/node_modules/@mui/lab/node_modules/@mui/base/OptionUnstyled/OptionUnstyled.js"],"sourcesContent":["import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"children\", \"component\", \"disabled\", \"label\", \"slotProps\", \"slots\", \"value\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { unstable_useForkRef as useForkRef } from '@mui/utils';\nimport composeClasses from '../composeClasses';\nimport { SelectUnstyledContext } from '../SelectUnstyled/SelectUnstyledContext';\nimport { getOptionUnstyledUtilityClass } from './optionUnstyledClasses';\nimport { useSlotProps } from '../utils';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction useUtilityClasses(ownerState) {\n  const {\n    disabled,\n    highlighted,\n    selected\n  } = ownerState;\n  const slots = {\n    root: ['root', disabled && 'disabled', highlighted && 'highlighted', selected && 'selected']\n  };\n  return composeClasses(slots, getOptionUnstyledUtilityClass, {});\n}\n\n/**\n * An unstyled option to be used within a SelectUnstyled.\n */\nconst OptionUnstyled = /*#__PURE__*/React.forwardRef(function OptionUnstyled(props, ref) {\n  const {\n      children,\n      component,\n      disabled,\n      label,\n      slotProps = {},\n      slots = {},\n      value\n    } = props,\n    other = _objectWithoutPropertiesLoose(props, _excluded);\n  const selectContext = React.useContext(SelectUnstyledContext);\n  if (!selectContext) {\n    throw new Error('OptionUnstyled must be used within a SelectUnstyled');\n  }\n  const Root = component || slots.root || 'li';\n  const selectOption = {\n    value,\n    label: label || children,\n    disabled\n  };\n  const optionState = selectContext.getOptionState(selectOption);\n  const optionProps = selectContext.getOptionProps(selectOption);\n  const listboxRef = selectContext.listboxRef;\n  const ownerState = _extends({}, props, optionState);\n  const optionRef = React.useRef(null);\n  const handleRef = useForkRef(ref, optionRef);\n  React.useEffect(() => {\n    // Scroll to the currently highlighted option\n    if (optionState.highlighted) {\n      if (!listboxRef.current || !optionRef.current) {\n        return;\n      }\n      const listboxClientRect = listboxRef.current.getBoundingClientRect();\n      const optionClientRect = optionRef.current.getBoundingClientRect();\n      if (optionClientRect.top < listboxClientRect.top) {\n        listboxRef.current.scrollTop -= listboxClientRect.top - optionClientRect.top;\n      } else if (optionClientRect.bottom > listboxClientRect.bottom) {\n        listboxRef.current.scrollTop += optionClientRect.bottom - listboxClientRect.bottom;\n      }\n    }\n  }, [optionState.highlighted, listboxRef]);\n  const classes = useUtilityClasses(ownerState);\n  const rootProps = useSlotProps({\n    elementType: Root,\n    externalSlotProps: slotProps.root,\n    externalForwardedProps: other,\n    additionalProps: _extends({}, optionProps, {\n      ref: handleRef\n    }),\n    className: classes.root,\n    ownerState\n  });\n  return /*#__PURE__*/_jsx(Root, _extends({}, rootProps, {\n    children: children\n  }));\n});\nprocess.env.NODE_ENV !== \"production\" ? OptionUnstyled.propTypes /* remove-proptypes */ = {\n  // ----------------------------- Warning --------------------------------\n  // | These PropTypes are generated from the TypeScript type definitions |\n  // |     To update them edit TypeScript types and run \"yarn proptypes\"  |\n  // ----------------------------------------------------------------------\n  /**\n   * @ignore\n   */\n  children: PropTypes.node,\n  /**\n   * The component used for the root node.\n   * Either a string to use a HTML element or a component.\n   */\n  component: PropTypes.elementType,\n  /**\n   * If `true`, the option will be disabled.\n   * @default false\n   */\n  disabled: PropTypes.bool,\n  /**\n   * A text representation of the option's content.\n   * Used for keyboard text navigation matching.\n   */\n  label: PropTypes.string,\n  /**\n   * The props used for each slot inside the OptionUnstyled.\n   * @default {}\n   */\n  slotProps: PropTypes.shape({\n    root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n  }),\n  /**\n   * The components used for each slot inside the OptionUnstyled.\n   * Either a string to use a HTML element or a component.\n   * @default {}\n   */\n  slots: PropTypes.shape({\n    root: PropTypes.elementType\n  }),\n  /**\n   * The value of the option.\n   */\n  value: PropTypes.any.isRequired\n} : void 0;\n\n/**\n * An unstyled option to be used within a SelectUnstyled.\n *\n * Demos:\n *\n * - [Unstyled Select](https://mui.com/base/react-select/)\n *\n * API:\n *\n * - [OptionUnstyled API](https://mui.com/base/api/option-unstyled/)\n */\nexport default /*#__PURE__*/React.memo(OptionUnstyled);"],"mappings":"AAAA,OAAOA,QAAQ,MAAM,oCAAoC;AACzD,OAAOC,6BAA6B,MAAM,yDAAyD;AACnG,MAAMC,SAAS,GAAG,CAAC,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,OAAO,CAAC;AAC/F,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,OAAOC,SAAS,MAAM,YAAY;AAClC,SAASC,mBAAmB,IAAIC,UAAU,QAAQ,YAAY;AAC9D,OAAOC,cAAc,MAAM,mBAAmB;AAC9C,SAASC,qBAAqB,QAAQ,yCAAyC;AAC/E,SAASC,6BAA6B,QAAQ,yBAAyB;AACvE,SAASC,YAAY,QAAQ,UAAU;AACvC,SAASC,GAAG,IAAIC,IAAI,QAAQ,mBAAmB;AAC/C,SAASC,iBAAiB,CAACC,UAAU,EAAE;EACrC,MAAM;IACJC,QAAQ;IACRC,WAAW;IACXC;EACF,CAAC,GAAGH,UAAU;EACd,MAAM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